//
// SCIID.h
// Usage: Define all service call interface for NewLife kernel.
// Create Date: 2008-03-11
// Author: MaJiuyue
//
#ifndef _SCIID_H_
#define _SCIID_H_

#include "../core/Resource.h"
#include "../core/ResourceManager.h"

namespace ServiceCallInterface
{
	// PageFrame Allocator
	namespace PageFrameAllocator
	{
		const static char * ResourceName = "core.PageFrameAllocator";
		const static int SCIID_GetPagesDesc = 0; 
		const static int SCIID_GetPagesAddr = 1;
		const static int SCIID_GetPageDesc = 2;
		const static int SCIID_GetPageAddr = 3;
		const static int SCIID_GetZeroedPageDesc = 4;
		const static int SCIID_GetZeroedPageAddr = 5;
		const static int SCIID_GetDMAPagesDesc = 6;
		const static int SCIID_GetDMAPagesAddr = 7;
		const static int SCIID_FreePagesDesc = 8;
		const static int SCIID_FreePagesAddr = 9;
		const static int SCIID_FreePageDesc = 10;
		const static int SCIID_FreePageAddr = 11;
	};

	// ActionManager
	namespace ActionManager
	{
		const static char * ResourceName = "core.ActionManager";
		const static int SCIID_ExceptionHandler = 0;
		const static int SCIID_IRQHandler = 1;
		const static int SCIID_SyscallHandler = 6;
		const static int SCIID_RegisterIRQAction = 2;
		const static int SCIID_RemoveIRQAction = 3;
		const static int SCIID_RegisterExAction = 4;
		const static int SCIID_RemoveExAction = 5;
	}

	// IntrGateManager
	namespace IntrGateManager
	{
		const static char * ResourceName = "core.IntrGateManager";
		const static int SCIID_SetGateProperty = 0;
		const static int SCIID_EnableInterrupt = 1;
		const static int SCIID_DisableInterrupt = 2; 
		const static int SCIID_EnableIRQ = 3;
		const static int SCIID_DisableIRQ = 4;
	}

	// ModuleManager
	namespace ModuleManager
	{
		const static char * ResourceName = "core.ModuleManager";
		const static int SCIID_GetModule = 0;
		const static int SCIID_AddModule = 1;
		const static int SCIID_DelModule = 2;
		const static int SCIID_GetModuleByIndex = 3;
		const static int SCIID_GetModuleCount = 4;
	}

	// ProcessManager
	namespace ProcessManager
	{
		const static char * ResourceName = "core.ProcessManager";
		const static int SCIID_GetProcessByPid = 0;
		const static int SCIID_CreateProcess = 1;
		const static int SCIID_DestroyProcess = 2;
		const static int SCIID_CreateProcessKNL = 3;
	}

	// Scheduler
	namespace Scheduler
	{
		const static char * ResourceName = "core.Scheduler";
		const static int SCIID_Schedule = 0;
		const static int SCIID_AddScheduleObject = 1;
		const static int SCIID_RemoveScheduleObject = 2;
		const static int SCIID_Block = 3;
		const static int SCIID_WakeUp = 4;
		const static int SCIID_SelectScheduleObject = 5;
	}

	// IPCCenter
	namespace IPCCenter
	{
		const static char * ResourceName = "core.IPCCenter";
		const static int SCIID_Send = 0;
		const static int SCIID_Receive = 1;
		const static int SCIID_SendKNL = 2;
	}
	
	// FileSystem
	namespace FileSystem
	{
		const static char * ResourceName = "core.FileSystem";
		const static int SCIID_GetRoot = 0;
		const static int SCIID_AddFileSystem = 1;
		const static int SCIID_GetFileSystem = 2;
		const static int SCIID_GetFile = 3;
	}
};
#endif

